#ifndef OGGRECORDER_H
#define OGGRECORDER_H

#include <QMainWindow>
#include <QMessageBox>
#include <QMediaRecorder>
#include <QAudioRecorder>
#include <QAudioProbe>
#include <QAudioDeviceInfo>
#include <QUrl>
#include <QDebug>

#include <QDir>
#include <QFileDialog>


namespace Ui {


class OggRecorder;
}

class OggRecorder : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit OggRecorder(QWidget *parent = 0);
    ~OggRecorder();
    
private slots:
    void on_actionExit_triggered();
    void on_actionAbout_triggered();
    void setOutputFile();
    void recordAudioOnOff();
    void updateRecordingState(QMediaRecorder::State state);
    void updateRecordingDuration(qint64 duration);
    void showErrorMessage();
    QUrl createAudioFilePath();

    void on_outputPushButton_clicked();
    void on_recordPushButton_clicked();

private:
    Ui::OggRecorder *ui;
    QAudioRecorder *audioRecorder;
    //QAudioFormat *settings;
    bool outputLocationFlag;
};

#endif // OGGRECORDER_H
